package com.nengchuan.kbms.dfs.controller.system;

import com.nengchuan.kbms.dfs.entity.dto.PermissionPriorityDTO;
import com.nengchuan.kbms.dfs.service.PermissionPriorityService;
import com.nengchuan.model.model.WrappedResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys/priority")
@Api(tags = "知识库数据后台管理 > 系统管理 > 文件管理 > 权限优先级管理 【已完成】")
public class PriorityController {

    @Autowired
    private PermissionPriorityService permissionPriorityService;

    @PostMapping("/update")
    @ApiOperation(value = "设置权限优先级")
    public WrappedResult<Boolean> update(@RequestBody PermissionPriorityDTO dto) {
        return WrappedResult.success(permissionPriorityService.update(dto));
    }

}
